package com.qq2008.game.mojie.form;

import java.util.List;

public class Result {

    public Result() {
        super();
    }

    public Result(int id, boolean flag, String code, String message, List<Object> list) {
        this.id = id;
        this.flag = flag;
        this.code = code;
        this.message = message;
        this.list = list;
    }

    private int id = 0;
    // 响应标识
    private boolean flag = false;
    // 响应代码
    private String code;
    // 响应消息
    private String message;
    // 返回列表数据
    private List<Object> list = null;

    public static String CODE_FORMAT_ERROR = "CODE_FORMAT_ERROR";           // 格式不正確
    public static String CODE_ILLEGAL_ERROR = "CODE_ILLEGAL_ERROR";         // 參數非法
    public static String CODE_NOT_FOUNT = "CODE_NOT_FOUNT";                 // 未找到相關結果
    public static String CODE_EXISTS_ERROR = "CODE_EXISTS_ERROR";           // 已存在
    public static String CODE_SIZE_ERROR = "CODE_SIZE_ERROR";               // 位數錯誤
    public static String CODE_ERROR = "CODE_ERROR";                         // 其他錯誤
    public static String CODE_OK = "CODE_OK";                               //

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public List<Object> getList() {
        return list;
    }

    public void setList(List<Object> list) {
        this.list = list;
    }

    public String getMessage() {
        return message;
    }

    public Result setMessage(String message) {
        this.message = message;
        return this;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }


}
